<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>

<div class="centralContainer">
	<div id="secNavigation">
		<ul>
			<li><security:authorize ifAllGranted="ROLE_ADMIN">
					<a href="<c:url value="/" />"><fmt:message key="user.view" />
					</a> |
					<a href="<c:url value="/manage" />"><fmt:message
							key="administrator.view" /> </a> | 
			</security:authorize>
			</li>
			<li><c:choose>
					<c:when test="${pageContext.request.userPrincipal != null}">
						<a href="<c:url value="/users/manageUser" />">${pageContext.request.userPrincipal.name}</a>
							| <a href="<c:url value="/users/logout" />"><fmt:message
								key="security.action.logout.label" /> </a>
					</c:when>
					<c:otherwise>
						<a href="<c:url value="/users/login" />"><fmt:message
								key="security.action.login.label" /> </a>
					</c:otherwise>
				</c:choose></li>
		</ul>
	</div>
</div>